package com.ruoyi.system.domain;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("订单表")
public class SpokenOrder extends BaseEntity{


    @ApiModelProperty("主键ID")
    private Long orderId;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("用户ID")
    private Long userId;

    @ApiModelProperty("订单状态：1待支付；2已购买；3已取消")
    private Integer status;

    @ApiModelProperty("购买的课节数")
    private Integer lessonNum;

    @ApiModelProperty("微信交易号")
    private String tradeNo;

    @ApiModelProperty("教师ID")
    private Long teacherId;

    @ApiModelProperty("支付金额")
    private BigDecimal payPrice;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("是否删除：0已删除；1正常")
    private Integer delFlag;

    @ApiModelProperty("课程分类ID")
    private Long courseTagId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("支付时间")
    private Date payTime;

    // 状态文字
    private String statusText;
    // 教师标签文字
    private List teacherTags;
    // 已选课节数
    private Integer choosedLessonNum;
    // 支付过期时间
    private Long expireTime;

    /**
     * 用户选择的课时信息
     */
    private List<SpokenUserCourseTime> userCourseTimeList;

    /**
     * 教师信息
     */
    private SysUser teacher;

    /**
     * 用户信息
     */
    private SysUser student;

    /**
     * 课程分类
     */
    private SpokenCourseTag courseTag;

}
